package com.member.shop.domain;

import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.member.common.annotation.Excel;
import lombok.Data;
import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.experimental.SuperBuilder;
import com.member.common.core.domain.BaseEntity;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 商品榜单对象 sys_biz_goods_rank
 *
 * @author lixinchen
 * @date 2025-01-11
 */
@Data
@SuperBuilder
@AllArgsConstructor
@NoArgsConstructor
@TableName("sys_biz_goods_rank")
public class SysBizGoodsRank extends BaseEntity {

    private static final long serialVersionUID = 1L;


    /**
     * 唯一id
     */
    @TableId(type = IdType.AUTO)
    private Long id;


    /**
     * 租户id
     */
    @Excel(name = "租户id")
    private Long tenantId;


    /**
     * 榜单id
     */
    @Excel(name = "榜单id")
    private Long rankId;


    /**
     * 商品id
     */
    @Excel(name = "商品id")
    private Long goodsId;


    /**
     * 入选时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "入选时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date addTime;


    /**
     * 入选类型(0 销量)
     */
    @Excel(name = "入选类型(0 销量)")
    private Integer addType;

    @TableField(exist = false)
    private SysBizGoods goods;
    /**
     * 排序（根据入选类型排序）
     */
    @Excel(name = "排序", readConverterExp = "根=据入选类型排序")
    private Long orderNum;


    /**
     * 是否删除(0：未删除，1：删除)
     */
    @Excel(name = "是否删除(0：未删除，1：删除)")
    private Long deleted;

}
